﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Save.aspx.cs" Inherits="MvcMall.AdminWeb.Manage.AdminUsers.Save" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <meta http-equiv="x-ua-compatible" content="ie=7" />
    <link href="/Scripts/Validate/pagevalidator.css" rel="stylesheet" type="text/css" />
    <link href="/Styles/Site.css" rel="stylesheet" type="text/css" />
    <link href="/Styles/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
    <script src="/Scripts/jquery-1.4.4.min.js" type="text/javascript"></script>
    <script src="/Scripts/jquery-ui.min.js" type="text/javascript"></script>
    <script src="/Scripts/Validate/pagevalidator.js" type="text/javascript"></script>
    <script>
        $(function () {
            $("#tabs").tabs();
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="tabs">
        <ul>
            <li><a href="#saveUser">新增管理员</a></li>
        </ul>
        <div id="saveUser">
            <asp:Label ID="lblAdminUserId" runat="server" Visible="false"></asp:Label>
            <fieldset>
                <div class="editor-label">
                    所属角色:
                </div>
                <div class="editor-field">
                    <asp:DropDownList ID="ddlRoles" DataTextField="Text" DataValueField="Value" runat="server">
                    </asp:DropDownList>
                </div>
                <div class="editor-label">
                    管理员用户名:
                </div>
                <div class="editor-field">
                    <asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
                    <div id="txtUserNameTip" style="width: 200px;">
                    </div>
                    <UC:ValidateTarget ID="ValidateTarget1" ContainerId="ValidatorContainer" runat="server"
                        OkMessage="OK" NullMessage="管理员用户名不能为空" ControlToValidate="txtUserName" Nullable="false"
                        FocusMessage="请输入管理员用户名,5-20个字符">
                        <Validators>
                            <UC:InputStringClientValidator ErrorMessage="请输入管理员用户名,5-20个字符" UpperBound="20" LowerBound="5" />
                        </Validators>
                    </UC:ValidateTarget>
                </div>
                <div class="editor-label">
                    登录密码:
                </div>
                <div class="editor-field">
                    <asp:TextBox ID="txtPassword" TextMode="Password" runat="server"></asp:TextBox>
                    <div id="txtPasswordTip" style="width: 200px;">
                    </div>
                    <UC:ValidateTarget ID="ValidateTarget2" ContainerId="ValidatorContainer" runat="server"
                        OkMessage="OK" NullMessage="登录密码不能为空" ControlToValidate="txtPassword" Nullable="false"
                        FocusMessage="请输入登录密码">
                        <Validators>
                            <UC:InputStringClientValidator ErrorMessage="请输入登录密码,5-20个字符" UpperBound="20" LowerBound="5" />
                        </Validators>
                    </UC:ValidateTarget>
                </div>
                <div class="editor-label">
                    确认密码:
                </div>
                <div class="editor-field">
                    <asp:TextBox ID="txtConfirmPassword" TextMode="Password" runat="server"></asp:TextBox>
                    <div id="txtConfirmPasswordTip" style="width: 200px;">
                    </div>
                    <UC:ValidateTarget ID="ValidateTarget3" ContainerId="ValidatorContainer" runat="server"
                        ControlToValidate="txtConfirmPassword" Nullable="false" NullMessage="请输入确认密码"
                        OkMessage="OK" FocusMessage="请输入确认密码">
                        <Validators>
                            <UC:InputStringClientValidator ErrorMessage="请输入确认密码" />
                            <UC:CompareClientValidator DestinationId="txtPassword" ErrorMessage="两次输入的密码不一致" />
                        </Validators>
                    </UC:ValidateTarget>
                </div>
                <div class="editor-label">
                    电子邮箱:
                </div>
                <div class="editor-field">
                    <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
                    <div id="txtEmailTip" style="width: 200px;">
                    </div>
                    <UC:ValidateTarget ID="ValidateTarget4" ContainerId="ValidatorContainer" runat="server"
                        ControlToValidate="txtEmail" Nullable="true" NullMessage="" OkMessage="OK" FocusMessage="请输入电子邮箱(可填)">
                        <Validators>
                            <UC:InputStringClientValidator UpperBound="128" ErrorMessage="请输入正确的电子邮箱" Regex="^[\\w-]+(\\.[\\w-]+)*@[\\w-]+(\\.[\\w-]+)+$" />
                        </Validators>
                    </UC:ValidateTarget>
                </div>
                <div class="editor-label">
                    手机号码:
                </div>
                <div class="editor-field">
                    <asp:TextBox ID="txtMobile" runat="server" MaxLength="11"></asp:TextBox>
                    <div id="txtMobileTip" style="width: 200px;">
                    </div>
                    <UC:ValidateTarget ID="ValidateTarget5" ContainerId="ValidatorContainer" runat="server"
                        ControlToValidate="txtMobile" Nullable="true" NullMessage="" OkMessage="OK" FocusMessage="请输入手机号码(可填)">
                        <Validators>
                            <UC:InputStringClientValidator UpperBound="128" ErrorMessage="请输入正确的手机号码" Regex="\\d{11}" />
                        </Validators>
                    </UC:ValidateTarget>
                </div>
                <p>
                    <asp:Button ID="btnSave" runat="server" Text="保存" 
                        OnClientClick="return PageIsValid();" onclick="btnSave_Click" /></p>
            </fieldset>
        </div>
    </div>
    <UC:ValidatorContainer runat="server" IsScriptManagerInside="false" ID="ValidatorContainer" />
    </form>
</body>
</html>
